package com.ufgov.agcfs.manage.web;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ufgov.agcfs.manage.service.ManageService;

@Controller("manage.manageController")
@Scope("prototype")
@RequestMapping(value = "/manage")

public class ManageController {
	private final Logger logger = LoggerFactory.getLogger(getClass());
	
	@Autowired
	private ManageService manageService;
	
 	@RequestMapping(method = RequestMethod.GET,value="getAllNd")
	public @ResponseBody List<String> getAllnd(HttpServletRequest request, HttpServletResponse response){
		List<String> ndList = new ArrayList<String>();
		try {
			ndList = manageService.getAllNd();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return ndList;		
	}
}
